import {RequestUtil} from '@/utils'

export class PopBasicHttp {
    static PREFIX = "/manager/pop/dis"





    static getLevelList = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/level/pageList`, params)

    static addLevel = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/level/add`, data)

    static updateLevel = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/level/update/${id}`, data)

    static delLevel = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/level/delete`, data)



    static getQuestionnaireList = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/questionnaire/pageList`, params)

    static addQuestionnaire = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/questionnaire/add`, data)

    static updateQuestionnaire = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/questionnaire/update/${id}`, data)

    static delQuestionnaire = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/questionnaire/delete`, data)



    static getInviterList = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/inviter/pageList`, params)

    static addInviter = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/inviter/add`, data)

    static updateInviter = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/inviter/update/${id}`, data)

    static delInviter = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/inviter/delete`, data)


    // 查询流水
    static getBillList =  (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/bill/pageList` ,params)




    static addExchange = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/exchange/add`, data)

    static updateExchange = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/exchange/update/${id}`, data)

    static delExchange = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/exchange/delete`, data)


    static getRecordPage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/record/pageList`, params)



}
